﻿using System;

namespace AbstractFactoryPatterDemo
{
    /// <summary>
    /// 具体工厂1----生产对应产品A1及B1
    /// </summary>
    public class ConCreateFactory1 : AbstractFactory    
    {
        public ConCreateFactory1()
        {
            Console.WriteLine("当前工厂使用ConCreateFactory1");
        }

        public override AbstractProductA CreateProductA()
        {
            Console.WriteLine("ConCreateFactory1创建产品A1");

            return new ProductA1();
        }

        public override AbstractProductB CreateProductB()
        {
            Console.WriteLine("ConCreateFactory1创建产品B1");

            return new ProductB1();
        }
    }
}